<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2016/3/17
 * Time: 16:27
 */

echo "<title>10-10 字符串的合并与分割</title>";
echo "<p style='text-align: center'><a href=\"index.php\"><font size=\"4\">目录</font></a></p>";
header("Content-type: text/html; charset=utf-8");
echo "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />";

//分隔字符串
$str = 'sun-moon-star';
$result = explode('-',$str);
print_r($result);//结果显示array（apple）







